﻿using DataWorks_Sqlite.MappingClass;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataWorks_Sqlite.MappingClassConfig
{
    internal class dw_systemversion_config : IEntityTypeConfiguration<dw_systemversion>
    {
        public void Configure(EntityTypeBuilder<dw_systemversion> builder)
        {
            builder.ToTable("dw_systemversion");
            builder.HasKey(b => b.key);
            builder.Property(a => a.version).HasMaxLength(255).IsRequired();
            builder.Property(a => a.commit).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.details).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.updatetime).HasColumnType("datetime").IsRequired();

        }
    }
}
